<!--
 * @Description: 富文本编辑器
 * @Author: qingyang
 * @Date: 2023-06-26 14:36:16
 * @LastEditors: qingyang
 * @LastEditTime: 2023-07-07 15:14:38
-->
<template>
  <div ref="editorRef" :id="propId"></div>
</template>
<script lang="ts">
export default {
  name: 'GVditor'
};
</script>
<script lang="ts" setup>
import { defineProps, defineEmits, defineExpose, watch } from 'vue';
import { baseProps } from './props';
import { useVditor } from './useVditor';
const props = defineProps(baseProps);
const emit = defineEmits(['update:content', 'change', 'blur']);
const { getEditValue, editorRef, stopUse, setEditValue } = useVditor(props, emit);

defineExpose({
  setEditValue,
  editorRef,
  getEditValue,
  stopUse
});
</script>
<style scoped>
:deep(.vditor-reset p) {
  margin-bottom: 0;
}
</style>
